#ifndef MODULE_H
#define MODULE_H

#include <string>
#include <map>
#include <iterator>

#include "gamekit/gamekit.h"

struct lua_State;

namespace gamekit
{
	class ScriptingComponent;

	namespace scripting
	{
		class Module
		{
			friend class gamekit::ScriptingComponent;

			typedef int (*LuaFunction) (lua_State*);
			typedef std::map<std::string, LuaFunction> FunctionMap;
			typedef std::map<std::string, LuaFunction>::const_iterator FunctionMapIter;

		public:
			void function(const std::string& name, LuaFunction func);

		private:
			Module(const std::string& name);

		private:
			std::string m_name;
			FunctionMap m_functions;
		};
	}
}

#endif
